#include"Ball.h"
#include<iostream>
#include<iomanip>

using namespace std;

Ball::Ball(double x, double y, double xspeed, double yspeed)
	:x(x), y(y), xspeed(xspeed), yspeed(yspeed){}

double Ball::getX()const{ 
	return x;
}

double Ball::getY()const{
	return y;

}
void Ball::setX(double x) { 
	this->x = x;

}
void Ball::setY(double y){
	this->y = y;


}
double Ball::getXSpeed()const{
	return xspeed;

}
double Ball::getYSpeed()const{
	return yspeed;

}
void Ball::setXSpeed(double xspeed){
	this->xspeed = xspeed;

}
void Ball::setYSpeed(double yspeed){
	this->yspeed = yspeed;



}
void Ball::setXY(double x, double y){
	this->x = x;
	this->y = y;

}
void Ball::setXYSpeed(double xspeed, double yspeed){
	this->xspeed = xspeed;
	this->yspeed = yspeed;
}
void Ball::move(){
	x += xspeed;
	y += yspeed;

}
void Ball::print()const{
	cout << fixed << setprecision(2);
	cout << "Ball @(" << x << ',' << y << ")with speed ("
		<< xspeed << ',' << yspeed << ')' << endl;

}

